var PreviewContentWindow = {
	win :null,
	showContent : function(url, title, theme) {
			if (this.win == null) {
				this.win = new Window( {
					className: theme,
					width :350,
					height :400,
					zIndex :100,
					resizable :true,
					draggable :true,
					wiredDrag :true
				});
			}
			this.win.setTitle(title);
			this.win.setAjaxContent(url);
			if(!this.isVisible())this.win.showCenter();
	},
	
	registerButton : function(elementId, url, title, theme) {
		var target = $(elementId);
		var oThis = this;
		target.observe('click', function(event) {
				oThis.showContent(url, title, theme);
		});
	},
	
	isVisible: function(){
		return (this.win != null && this.win.isVisible());
	},
	
	isSame: function(){
		return (this.lastElementId == null || this.lastElementId == this.currentElementId);
	}
};